home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Amiga Plus 2004 #9
/
Amiga Plus CD - 2004 - No. 09.iso
/
amigaplus
/
tools
/
dev_libs
/
feelin040718
/
demos
/
notify2.e
< prev
next >
Wrap
Text File
|
2004-08-03
|
3KB
|
89 lines
OPT PREPROCESS
MODULE 'feelin','libraries/feelin','utility/hooks'
ENUM FA_Prop_First,
FA_Numeric_Value
PROC main()
DEF app,win,p1,p2,p3,p4,g,s,ids:PTR TO feelinDynamicEntry,hook:hook
hook.entry := {numeric_hook}
IF feelinbase := OpenLibrary('feelin.library',FV_VERSION)
app := AppObject,
FA_Application_Title, 'demo_Notify2',
FA_Application_Version, '$VER: demo_Notify2 04.00 (04/01/2003)',
FA_Application_Copyright, '©2000 - 2003, Olivier LAVIALE',
FA_Application_Author, 'Olivier LAVIALE <HaploLaMain@aol.com>',
FA_Application_Description, 'Testing...',
FA_Application_Base, 'demo_Notify2',
Child, win := WindowObject,
FA_Window_Title, 'Feelin : Props',
FA_Window_Open, TRUE,
Child, VGroup,
Child, TextObject, FA_Text,{__Text},FA_SetMax,TRUE, DontChain, End,
Child, p1 := Prop(TRUE,32,16,0),
Child, p2 := Prop(TRUE,32,08,0),
Child, p3 := Prop(TRUE,32,04,0),
Child, p4 := Prop(TRUE,32,02,0),
Child, Bar,
Child, VGroup, FA_SetMax,FV_SetMaxH,
Child, s := SliderA(TRUE,0,1024,0),
FA_ID, "SLDR",
FA_Font, 'Nokia/13',
'FA_Numeric_Format', '<pens style=emboss shadow=halfshadow>Level: %ld',
End,
Child, g := F_NewObjA(FC_Gauge,[
FA_Horizontal, TRUE,
'FA_Numeric_Min', 0,
'FA_Numeric_Max', 32,
'FA_Numeric_ComputeHook', hook,
End,
Child, ScaleObject, End,
End,
End,
FA_Window_ActiveObject,p4,
End,
End
IF app
ids := ['FA_Prop_First',0,'FA_Numeric_Value',0,NIL]
F_DynamicResolveTable(ids)
F_DoA(p2,FM_Notify,[F_ID(ids,FA_Prop_First),FV_Notify_Always,p1,FM_Set,2,F_ID(ids,FA_Prop_First),FV_Notify_Value])
F_DoA(p3,FM_Notify,[F_ID(ids,FA_Prop_First),FV_Notify_Always,p2,FM_Set,2,F_ID(ids,FA_Prop_First),FV_Notify_Value])
F_DoA(p4,FM_Notify,[F_ID(ids,FA_Prop_First),FV_Notify_Always,p3,FM_Set,2,F_ID(ids,FA_Prop_First),FV_Notify_Value])
F_DoA(s,FM_Notify,[F_ID(ids,FA_Numeric_Value),FV_Notify_Always,g,FM_Set,2,F_ID(ids,FA_Numeric_Value),FV_Notify_Value])
F_DoA(win,FM_Notify,[FA_Window_CloseRequest,TRUE,FV_Notify_Parent,FM_Application_Shutdown,0])
F_DoA(app,FM_Application_Run,NIL)
F_DisposeObj(app)
ENDIF
CloseLibrary(feelinbase)
ENDIF
ENDPROC
->PROC numeric_hook
F_HOOKM(numeric_hook,LONG)
RETURN msg[0] / 32
ENDPROC
__Text:
CHAR '<align=justify><pens style=shadow>Notification example :<br>',
'four Proportionnals,<br>',
'a Slider and a Gauge',0